import { IButtonProps } from './button.types';
import cn from 'classnames';
import styles from './button.module.scss';

const Button = ({
	children,
	className,
	appearance = 'small',
	disabled,
	...props
}: IButtonProps) => {
	return (
		<button
			className={cn(styles['button'], styles['accent'], className, {
				[styles.big]: appearance === 'big',
				[styles.small]: appearance === 'small',
				[styles.disabled]: disabled === true
			})}
			disabled={disabled}
			{...props}
		>
			{children}
		</button>
	);
};

export default Button;
